package com.example.homework_1;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

public class CakeDB {
    private static Map<String, Cake> cake = new LinkedHashMap<String, Cake>();
    static {
        cake.put("1",new Cake("1","A类蛋糕",10));
        cake.put("2",new Cake("2","b类蛋糕",20));
    }
    public static Collection<Cake> getALL() {
        return cake.values();
    }
    public static Cake getCake(String id) {
        return cake.get(id);
    }
}
